import Vue from 'vue'
import App from './App.vue'
import Vuex from 'vuex'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'regenerator-runtime/runtime'
// 引入全局样式
import './styles/reset.less'
import COMMON from '@/common/common'
import CONFIG from '@/common/config'

Vue.use(Vuex)
Vue.prototype.eventBus = new Vue()
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Vue.use(ElementUI)

if (COMMON.getStorage('token')) {
  // COMMON.getUserinfo()
}

Vue.prototype.COMMON = COMMON
Vue.prototype.CONFIG = CONFIG

Vue.prototype.TOKEN = COMMON.getStorage('token') || ''

Vue.config.productionTip = false

const that = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

export default that
